<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
    <title>标题</title>
<script>
function alertTest(){
    window.alert("message");
}

function confirmTest(){
    var result = window.confirm("message");
    if (result == true){
        alert("true");
    } else {
        alert ("flase");
    }
}

function inputTest(){
    var result = window.prompt("message","嘿哈！");
    if (result != null && result != ""){
        alert(result);
    }
}

</script>
</head>
<body>

    <button type="button" onclick="alertTest()" style="color:blue;margin-left:40px;font-size:50px;">alert</button>

    <button type="button" onclick="confirmTest()" style="color:red;margin-left:40px;font-size:50px;">confirm</button>

    <button type="button" onclick="inputTest()" style="color:green;margin-left:40px;font-size:50px;">input</button>

</body>
</html>

